package com.banana.springcloud.service.fallback;

import com.banana.springcloud.service.OpenFeignOrderService;
import org.springframework.stereotype.Component;

/**
 * 全局服务降级处理类
 * @author layman
 * @date 2021/1/18
 */
@Component
public class OpenFeignOrderFallbackService implements OpenFeignOrderService {
    /**
     * 模拟成功访问
     * @param id ：主键
     * @return CommonResult<Payment>
     */
    @Override
    public String feignSuccess(Long id) {
        return "-------OpenFeignOrderFallbackService, feignSuccess出错啦 , o(╥﹏╥)o";
    }

    /**
     * 模拟openFeign访问超时
     * @param id ：主键
     * @return String
     */
    @Override
    public String feignTimeout(Long id) {
        return "-------OpenFeignOrderFallbackService, feignTimeout出错啦 , o(╥﹏╥)o";
    }
}
